import { createApp } from 'vue'
import App from '@/App.vue'

import ElementPlus from 'element-plus';
import 'element-plus/dist/index.css'
import 'virtual:svg-icons-register'
import globalComponent from "@/components/index"
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
import '@/styles/index.scss'
import router from './router';
import pinia from "@/store"
import "./permisstion";
import * as ElementPlusIconsVue from '@element-plus/icons-vue';
import { isHasButton } from '@/directive/has';
// main.ts
// 如果只想导入css变量
import 'element-plus/theme-chalk/dark/css-vars.css'
const app = createApp(App)
isHasButton(app)
app.use(globalComponent)
app.use(router)
app.use(ElementPlus, {
  locale: zhCn
})
app.use(pinia)
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}
console.log(import.meta.env);
app.mount('#app')
